bitkeeper revision 1.339.1.9 (3f12dd84Gykr1oP22loPEr0jPp3VJA)
authorrac61@labyrinth.cl.cam.ac.uk <rac61@labyrinth.cl.cam.ac.uk>
Mon, 14 Jul 2003 16:42:44 +0000 (16:42 +0000)
committerrac61@labyrinth.cl.cam.ac.uk <rac61@labyrinth.cl.cam.ac.uk>
Mon, 14 Jul 2003 16:42:44 +0000 (16:42 +0000)
Detect link-local addresses in xi_vifinit and route them via dom0, not the physical interface

BitKeeper/etc/ignore
tools/internal/xi_vifinit

index d37d791d56d1d9fc6e301f83a1097f5bcd477d4f..eecba6127010d27aa39c38762e41dae67594508d 100644 (file)
@@ -463,3 +463,7 @@ tools/control/web/pd-l.jsp
 tools/control/web/pd-r.jsp
 tools/control/web/pd-rr.jsp
 tools/control/web/pd.jsp
+tools/internal/xi_list
+tools/internal/xi_usage
+tools/internal/xi_sched_domain
+tools/internal/xi_sched_global
index 0da845984bfa7ee412756de778e60a8933f6dc25..45b44704c31f7ce10d75e81785b5c3dc68d17829 100755 (executable)
@@ -16,7 +16,15 @@ then
 fi
 
 #outbound rule:
-echo "ADD ACCEPT srcaddr=$3 srcaddrmask=255.255.255.255 srcdom=$1 srcidx=$2 dst=PHYS proto=any" > /proc/xeno/vfr
+echo $3 | grep -q "^169\\.254\\."
+if [ $? -eq 0 ];
+then
+       # If this is a link local address, send to dom0
+       echo "ADD ACCEPT srcaddr=$3 srcaddrmask=255.255.255.255 srcdom=$1 srcidx=$2 dstdom=0 dstidx=0 proto=any" > /proc/xeno/vfr
+else
+       # If this is not, send to wire
+       echo "ADD ACCEPT srcaddr=$3 srcaddrmask=255.255.255.255 srcdom=$1 srcidx=$2 dst=PHYS proto=any" > /proc/xeno/vfr
+fi
 
 #inbound rule:
 echo "ADD ACCEPT dstaddr=$3 dstaddrmask=255.255.255.255 src=ANY dstdom=$1 dstidx=$2 proto=any" > /proc/xeno/vfr